package org.itboys.mobile.dto.order;

import com.fasterxml.jackson.annotation.JsonIgnore;
import org.itboys.mobile.dto.common.MobileBaseDto;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 作者：jiangxiong
 * 日期：2016年11月25日
 * 联系方式 ：empty90911@126.com
 * 描述：圣代_订单_商品_DTO
 */
public class SundayOrderDto extends MobileBaseDto{
    //基础信息
    private String orderNo;//订单编号
    private Integer type;//订单类型。1普通，2新品，3特卖，4全球购，5金领，6爱购币，7积分，8秒杀，9拼团，10试用
    private BigDecimal totalAmount;//订单金额应付
    private BigDecimal payAmount;//订单金额实付
    private Integer status;//订单状态。  1:待付款;2:待配送;3:配送中;4:待评价;5:已评价;6: 待退款; 7:已退款; 8: 待退货; 9: 已退货;10: 已取消;11:待拼团;
    private String memberIdCard;//身份证号
    private String memberRealName;//真实姓名
    //订单归属门店信息
    private Long shopId;//门店ID。自营为0
    private String shopName;//门店名称
    //收货人信息
  //  private Long addressId;//地址id
    private String  receiveName;//收货人
    private String receiveMobile;//收货电话
    private String receiveAddress;//收货地址
    //订单备注
    private String remark;//订单备注
    private String info;//订单说明
    //运费
    private BigDecimal sendAmount;//配送费
  //  private BigDecimal aiGouUsedAmount;// 户本次结算使用的爱购币对应的金额。
    //优惠券
 //   private Long couponId;//优惠券ID
    private BigDecimal couponAmount;//优惠券优惠金额
    //爱购币
    @JsonIgnore
    private BigDecimal aiGouUsedCoin;//用户本次结算使用的爱购币。按用户等级来。

    private BigDecimal aiGouUsedAmount;//用户本次结算使用的爱购币对应的金额。
    //余额
    private BigDecimal balanceUsedAmount;//使用的余额
    //贝壳
    private  BigDecimal conchUsedAmount;//使用的贝壳
    //运单信息
    private String sendCompany;//快递公司
    private String sendCompanyCode;//快递公司编号
    private String sendCode;//运单编号
    //时间信息
    private String payTime;//付款时间
    private String sendTime;//发货时间
    private String receiveTime;//收货时间
    private List<SundayOrderProductDto> products;

    private Integer totalNum;//订单总件数,所有子产品订单的数量总和


    //退货地址
    private String afterSaleAddress;
    //2018年2月14日
    private Integer sendType;//配送方式 1，门店配送，2自提
    public SundayOrderDto() {

    }
    public SundayOrderDto(long id, String createTime, String createDate,
                          String orderNo, Integer type, BigDecimal totalAmount, BigDecimal payAmount, Integer status,
                          String memberIdCard, String memberRealName,
                          Long shopId, String shopName,
                          String receiveName, String receiveMobile, String receiveAddress,
                          String remark, String info, BigDecimal sendAmount,
                         BigDecimal aiGouUsedCoin, BigDecimal aiGouUsedAmount, BigDecimal couponAmount, BigDecimal balanceUsedAmount,BigDecimal conchUsedAmount,
                          //2018年2月24日，增加配送方式
                          Integer sendType
                        /*  String sendCompany, String sendCompanyCode, String sendCode,
                          String payTime, String sendTime, String receiveTime, List<SundayOrderProductDto> products*/) {
        super(id, createTime, createDate);
        this.orderNo = orderNo;
        this.type = type;
        this.totalAmount = totalAmount;
        this.payAmount = payAmount;
        this.status = status;
        this.memberIdCard = memberIdCard;
        this.memberRealName = memberRealName;
        this.shopId = shopId;
        this.shopName = shopName;
        this.receiveName = receiveName;
        this.receiveMobile = receiveMobile;
        this.receiveAddress = receiveAddress;
        this.remark = remark;
        this.info = info;
        this.sendAmount = sendAmount;
        this.aiGouUsedCoin=aiGouUsedCoin;
        this.aiGouUsedAmount = aiGouUsedAmount;
        this.couponAmount = couponAmount;
        this.balanceUsedAmount = balanceUsedAmount;
        this.conchUsedAmount=conchUsedAmount;
        this.sendType=sendType;
    /*    this.sendCompany = sendCompany;
        this.sendCompanyCode = sendCompanyCode;
        this.sendCode = sendCode;
        this.payTime = payTime;
        this.sendTime = sendTime;
        this.receiveTime = receiveTime;
        this.products = products;*/
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public BigDecimal getTotalAmount() {
        return totalAmount;
    }

    public void setTotalAmount(BigDecimal totalAmount) {
        this.totalAmount = totalAmount;
    }

    public BigDecimal getPayAmount() {
        return payAmount;
    }

    public void setPayAmount(BigDecimal payAmount) {
        this.payAmount = payAmount;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getMemberIdCard() {
        return memberIdCard;
    }

    public void setMemberIdCard(String memberIdCard) {
        this.memberIdCard = memberIdCard;
    }

    public String getMemberRealName() {
        return memberRealName;
    }

    public void setMemberRealName(String memberRealName) {
        this.memberRealName = memberRealName;
    }

    public Long getShopId() {
        return shopId;
    }

    public void setShopId(Long shopId) {
        this.shopId = shopId;
    }

    public String getShopName() {
        return shopName;
    }

    public void setShopName(String shopName) {
        this.shopName = shopName;
    }

    public String getReceiveName() {
        return receiveName;
    }

    public void setReceiveName(String receiveName) {
        this.receiveName = receiveName;
    }

    public String getReceiveMobile() {
        return receiveMobile;
    }

    public void setReceiveMobile(String receiveMobile) {
        this.receiveMobile = receiveMobile;
    }

    public String getReceiveAddress() {
        return receiveAddress;
    }

    public void setReceiveAddress(String receiveAddress) {
        this.receiveAddress = receiveAddress;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getInfo() {
        return info;
    }

    public void setInfo(String info) {
        this.info = info;
    }

    public BigDecimal getSendAmount() {
        return sendAmount;
    }

    public void setSendAmount(BigDecimal sendAmount) {
        this.sendAmount = sendAmount;
    }

    public BigDecimal getAiGouUsedCoin() {
        return aiGouUsedCoin;
    }

    public void setAiGouUsedCoin(BigDecimal aiGouUsedCoin) {
        this.aiGouUsedCoin = aiGouUsedCoin;
    }

    public BigDecimal getAiGouUsedAmount() {
        return aiGouUsedAmount;
    }

    public void setAiGouUsedAmount(BigDecimal aiGouUsedAmount) {
        this.aiGouUsedAmount = aiGouUsedAmount;
    }

    public BigDecimal getCouponAmount() {
        return couponAmount;
    }

    public void setCouponAmount(BigDecimal couponAmount) {
        this.couponAmount = couponAmount;
    }

    public BigDecimal getBalanceUsedAmount() {
        return balanceUsedAmount;
    }

    public void setBalanceUsedAmount(BigDecimal balanceUsedAmount) {
        this.balanceUsedAmount = balanceUsedAmount;
    }

    public BigDecimal getConchUsedAmount() {
        return conchUsedAmount;
    }

    public void setConchUsedAmount(BigDecimal conchUsedAmount) {
        this.conchUsedAmount = conchUsedAmount;
    }

    public String getSendCompany() {
        return sendCompany;
    }

    public void setSendCompany(String sendCompany) {
        this.sendCompany = sendCompany;
    }

    public String getSendCompanyCode() {
        return sendCompanyCode;
    }

    public void setSendCompanyCode(String sendCompanyCode) {
        this.sendCompanyCode = sendCompanyCode;
    }

    public String getSendCode() {
        return sendCode;
    }

    public void setSendCode(String sendCode) {
        this.sendCode = sendCode;
    }

    public String getPayTime() {
        return payTime;
    }

    public void setPayTime(String payTime) {
        this.payTime = payTime;
    }

    public String getSendTime() {
        return sendTime;
    }

    public void setSendTime(String sendTime) {
        this.sendTime = sendTime;
    }

    public String getReceiveTime() {
        return receiveTime;
    }

    public void setReceiveTime(String receiveTime) {
        this.receiveTime = receiveTime;
    }

    public List<SundayOrderProductDto> getProducts() {
        return products;
    }

    public void setProducts(List<SundayOrderProductDto> products) {
        this.products = products;
    }

    public Integer getTotalNum() {
        return totalNum;
    }

    public void setTotalNum(Integer totalNum) {
        this.totalNum = totalNum;
    }

    /*public Long getAddressId() {
        return addressId;
    }

    public void setAddressId(Long addressId) {
        this.addressId = addressId;
    }*/

    public String getAfterSaleAddress() {
        return afterSaleAddress;
    }

    public void setAfterSaleAddress(String afterSaleAddress) {
        this.afterSaleAddress = afterSaleAddress;
    }

    public Integer getSendType() {
        return sendType;
    }

    public void setSendType(Integer sendType) {
        this.sendType = sendType;
    }

    public String  getStatusStr(){
        String statusStr= "";
        if(status==null)return statusStr;

        switch (status) {
            case 1:
                statusStr="待付款";
                break;
            case 2:
                statusStr="待配送";
                break;
            case 3:
                 statusStr="配送中";
                break;
            case 4:
                statusStr="待评价";
                break;
            case 5:
                statusStr="已评价";
                break;
            case 6:
                statusStr="待退款";
                break;
            case 7:
                statusStr="已退款";
                break;
            case 8:
                statusStr="待退货";
                break;
            case 9:
                statusStr="已退货";
                break;
            case 10:
                statusStr="已取消";
                break;
            case 11:
                statusStr="待拼团";
                break;
            default:
                break;
        }
        return statusStr;
    }
    public String getTypeStr(){
        String typeStr= "";
        if(type==null)return typeStr;

        switch (type) {
            case 1:
                typeStr="普通";
                break;
            case 2:
                typeStr="新品";
                break;
            case 3:
                typeStr="特卖";
                break;
            case 4:
                typeStr="全球购";
                break;
            case 5:
                typeStr="分销";
                break;
            case 6:
                typeStr="爱购币";
                break;
            case 7:
                typeStr="积分";
                break;
            case 8:
                typeStr="秒杀";
                break;
            case 9:
                typeStr="拼团";
                break;
            case 10:
                typeStr="试用";
                break;
            default:
                break;
        }
        return typeStr;
    }
    public String  getSendTypeStr() {
        String sendTypeStr = "";
        if (sendType == null) return sendTypeStr;

        switch (sendType) {
            case 1:
                sendTypeStr = "门店配送";
                break;
            case 2:
                sendTypeStr = "自提";
                break;
        }
        return sendTypeStr;
    }
}


